package com.zork.data.generator.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zork.data.generator.mapper.TopologyInfoMapper;
import com.zork.data.generator.model.TopologyInfo;
import com.zork.data.generator.service.TopologyInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xiesen
 */
@Service
@DS("arch")
public class TopologyInfoServiceImpl extends ServiceImpl<TopologyInfoMapper, TopologyInfo> implements TopologyInfoService {

    @DS("arch")
    @Override
    public List<TopologyInfo> searchAll() {
        return this.list(Wrappers.lambdaQuery(TopologyInfo.class)
                .select(TopologyInfo::getTopoid, TopologyInfo::getSystemname));
    }
}
